<template> 
	 <div>
	 	<Model v-bind:taskId="taskId" v-bind:userId="userId"></Model>
	 	<div class="container">
        <!-- 审批信息 -->
        <div class="info-preview">
            <div class="h5-list-address content">
                <div class="h5-list-flex">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-address.png"></div>
                    	房产地址：
                </div>
                <div class="white h5-address">{{signedCheckOutInfo.roomName}}</div>
            </div>
            <div class="h5-list-flex content h5-height-default h5-user-info border-top-bottom-green">
                <div class="item left-item border-right-green">
                    <div class="font12"><img src="../../assets/images/title-user.png">发起人</div>
                    <div class="white">{{signedCheckOutInfo.actCreateName}}</div>
                </div>
                <div class="item center-item border-right-green">
                    <div class="font12"><img src="../../assets/images/title-user.png">经纪人</div>
                    <div class="white">{{signedCheckOutInfo.userName}}</div>
                </div>
                <div class="item right-item">
                    <div class="font12"><img src="../../assets/images/title-user.png">客户姓名</div>
                    <div class="white">{{signedCheckOutInfo.customerName}}</div>
                </div>
            </div>
            <div class="content">
                <div class="h5-list-flex h5-apply-time">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-time.png"></div>
                    <div>申请时间：{{signedCheckOutInfo.tcCreateTime}}</div>
                </div>
            </div>
        </div>
        <!-- 退房原因 -->
        <div class="h5-list border-top-bottom-default">
            <div class="h5-list-box border-bottom-default">
                <div class="h5-list-flex h5-list-title border-bottom-primary green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-apply.png"></div>
                   		 退房原因
                </div>
                <div class="h5-list-item">
                    <div class="content">
                        <div class="h5-item-txt">{{signedCheckOutInfo.remark}}</div>
                    </div>
                </div>
            </div>
            <div class="h5-list-box">
                <div class="content">
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">签约总价：</div>
                        <div class="h5-item-content">{{signedCheckOutInfo.signAmount}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default">
                        <div class="h5-item-label">签约日期：</div>
                        <div class="h5-item-content">{{signedCheckOutInfo.createTime}}</div>
                    </div>
                </div>
            </div>
        </div>
         <!--设置单页面标题-->
	    <Document v-bind:processId="processId"></Document>
        <!-- 附件 -->
        <ActivityFile v-bind:objectId="objectId" v-bind:imageType="imageType"></ActivityFile>
        <!-- 审批进度 h-->
        <ActivityHistory v-bind:processId="processId" v-bind:userId="userId"></ActivityHistory>
        
        
    </div>
    <div class="md-overlay"></div>
    <div class="h5-btn-list">
        <a class="h5-btn h5-btn-primary md-trigger" data-modal="modal-1" style="width: 100%;">审核</a>
    </div>
	 	
	 </div>
</template>

<script type="text/javascript">
	import ActivityHistory  from '../common/activityHistory.vue'
	import ActivityFile from '../common/activityFile.vue'
	import Model from '../common/modal.vue'
	import Document from '../common/document.vue'
	export default{
		data(){
			return{
				signedCheckOutInfo:{},
				processId:'',
				userId:'',
				objectId:'',
				imageType:'6',
				taskId:''
			}
		},
		mounted:function(){
			this.initSignedCheckOut();
		},
		components:{
			ActivityHistory,
			ActivityFile,
			Model,
			Document
		},
		methods:{
			initSignedCheckOut:function(){
				var _self = this;
				var busKey = _self.$route.params.busKey;
				_self.objectId = busKey;
				_self.processId = _self.$route.params.processId;
				_self.userId = _self.$route.params.userId;
				_self.taskId = _self.$route.params.taskId;
				var url = _self.utilHelper.apiUrl+'/wordFlowData/signedCheckOut';
				var params = {
					id:busKey
				};
				_self.$http.post(url,params).then((response)=>{
					var body = response.body;
					if(body.res=="1"){
						_self.signedCheckOutInfo = body.obj.signedCheckOutInfo;
					}else{
						layer.alert("接口异常,请联系管理员");
					}
				});
			}
		}
	}
	
</script>
